<!DOCTYPE html>
<html lang="en">


<style>
.profile-info-name {
	text-align: right;
	padding: 6px 10px 6px 4px;
	font-weight: 400;
	color: #667E99;
	background-color: transparent;
	width: 150px;
	vertical-align: middle
}
.profile-info-name2 {
	text-align: right;
	padding: 6px 10px 6px 4px;
	font-weight: 400;
	color: #667E99;
	background-color: #EDF3F4;
	width: 100px;
	vertical-align: middle
}

.search-media {
	border: 1px solid #ddd;
	margin-top: -1px;
	padding: 12px 12px 12px 12px;
	-webkit-transition: border .1s ease-in-out 0s;
	-o-transition: border .1s ease-in-out 0s;
	transition: border .1s ease-in-out 0s;
	position: relative
}
</style>

<body class="no-skin">

<div class="main-container ace-save-state" id="main-container">

    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <!-- 
				<div class="page-header">
					
				</div>--><!-- /.page-header -->
				
				
				<div class="row">
					<div class="col-sm-12">
						<div class="widget-header widget-header-blue widget-header-flat">
							<h4 class="widget-title lighter">
								#if("${action}"=="add")
									新增引用单位 
								#end
								#if("${action}"=="update")
									编辑引用单位  
								#end
							</h4>
						</div>
						
					</div>
				</div>
				<div class="row">
					<div class="col-sm-12">						
						<form type="post" action="$!{webPath}/basicData/updateAidReportChannel" id="detailForm" data-toggle="validate" data-alertmsg="false">
						<div  class="hidden">
							<input class="col-xs-12 col-sm-10" type="text"  id="form-field-channelId" name="channelId" placeholder="channelId" value="$!{aidReportChannelPO.channelId}" />
							<input class="col-xs-12 col-sm-10" type="text"  id="form-field-action" name="action" placeholder="action" value="$!{action}" />
						</div>
						
						<div class="col-xs-12">
							<div class="form-group">
								<label class="col-sm-3 control-label no-padding-right" for="form-title"> 引用单位名称 </label>
								<div class="col-sm-9">
									<input value="$!{aidReportChannelPO.channelName}" name="channelName" type="text" id="form-channelName" placeholder="引用单位名称" class="col-xs-10 col-sm-8">
								</div>
							</div>
							
							
						</div>
						</form>
						
					</div>
				</div>
				
				<div class="col-sm-12">
					<div id="dialog-message" class="hide" title="操作结果">
						<h5 class="widget-main">保存成功. </h5>
					</div>
				</div>
											
				<div class="row">
					<div class="col-sm-12">
						<div class="profile-activity clearfix" id="pkh_detail_title_id">
							<div class="center col-md-12">
								<button id="submitFormBtn" class="btn btn-info" type="button">
									<i class="ace-icon fa fa-check bigger-110"></i>
									确定
								</button>
								<button id="backBtn" class="btn" type="button">
									<i class="ace-icon fa fa-undo bigger-110"></i>
									返回
								</button>
							</div>
						</div>
					</div>
				</div>				
				
				<div class="hr hr4 hr-dotted"></div>
				
				
				<!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div>
</div>


		<script type="text/javascript">
		
		jQuery(function($) {
			$("#submitFormBtn").on('click',function () {
				if($('#form-channelName').val()==""){
					$.msgErrorAlert("引用单位名称不能为空.");
					return;
				}
				
				$('#detailForm').ajaxSubmit({    
					url:'$!webPath/basicData/updateAidReportChannel',  
					dataType: 'text',
					type : 'POST',
					success: resutlMsg,  
					error: errorMsg  
				});   
				function resutlMsg(rowData){
					console.log($('#editRowId').val());
					//jQuery("#family-member-list").jqGrid('setRowData',$('#editRowId').val(),$.parseJSON(rowData));
					reloadGridData();
					$('#operateDetailModal').modal('hide');
					var dialog = $( "#dialog-message" ).removeClass('hide').dialog({
						modal: true,
						buttons: [ 
							
							{
								text: "确定",
								"class" : "btn btn-primary btn-minier",
								click: function() {
									$( this ).dialog( "close" ); 
								} 
							}
						]
					});
					
					
					
				}  
				function errorMsg(){   
					$.msgErrorAlert("发生异常！");      
				}  
			});
			
			$("#backBtn").on('click',function () {
				$('#operateDetailModal').modal('hide');
				
			});
			
		});
		</script>

</body>
</html>
